<form method="post" action="<?php _actionUrl($this)?>" onsubmit="return ajax_form(this)">
<input type="hidden" name="ID" value="<?php _e($post['ID'])?>"/>
<div class="x-list-title"> 
<table height="100%" width="100%" border="0" cellpadding="0">
<tr><td>
<h2>Nhóm người dùng mới</h2>
</td></tr></table>
</div>
<div class="x-form-container">
<table width="100%" border="0" cellpadding="5" class="x-form">
	<tr class="row-message">
		<td colspan="2">
			<div class="form-message"></div>
		</td>
	</tr>
	<tr>
		<td class="x-form-label" width="150">
			Tên nhóm:
		</td>
		<td class="x-form-input">
			<input name="title" type="text" style="width:200px" class="x-text" value=""/>
		</td>
	</tr>
	<tr>
		<td class="x-form-label">
			Phân quyền nhóm:
		</td>
		<td class="x-form-input">
			<table style="background:#fff" border="1" bordercolor="#cccccc" cellpadding="0">
				<tr>
					<td valign="top" height="100">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Hệ thống</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="login" checked/></td>
								<td>Truy cập</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="email" checked/></td>
								<td>Email</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="message" checked/></td>
								<td>Tin nhắn</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="yahoo" checked/></td>
								<td>Chát</td>
							</tr>												
							<tr>
								<td><input type="checkbox" name="roles[]" value="manage_admin"/></td>
								<td>Quản trị hệ thống</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="manage_news"/></td>
								<td>Quản trị tin tức</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="manage_forum"/></td>
								<td>Quản trị diễn đàn</td>
							</tr>						
						</table>					
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Dự án / công việc</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="task" checked/></td>
								<td>Truy cập</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_project"/></td>
								<td>Tạo dự án</td>
							</tr>						
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_task"/></td>
								<td>Tạo công việc</td>
							</tr>						
						</table>						
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Công văn</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="diploma" checked/></td>
								<td>Truy cập</td>
							</tr>							
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_diploma"/></td>
								<td>Tạo công văn</td>
							</tr>						
						</table>					
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Tài liệu</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="document" checked/></td>
								<td>Truy cập</td>
							</tr>							
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_document"/></td>
								<td>Tạo tài liệu</td>
							</tr>				
						</table>								
					</td>
				</tr>
				<tr>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Nhân sự</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="personnel"/></td>
								<td>Truy cập</td>
							</tr>
						</table>						
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Lịch biểu</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="calendar" checked/></td>
								<td>Truy cập</td>
							</tr>	
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_calendar_private" checked/></td>
								<td>Thêm lịch cá nhân</td>
							</tr>	
							<tr>
								<td><input type="checkbox" name="roles[]" value="add_company_calendar"/></td>
								<td>Thêm lịch cơ quan</td>
							</tr>
						</table>						
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>CRM</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="crm" checked/></td>
								<td>Truy cập</td>
							</tr>	
							<tr>
								<td><input type="checkbox" name="roles[]" value="crm_admin"/></td>
								<td>Quản lý</td>
							</tr>	
						</table>	
					</td>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Tài sản</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="asset" checked/></td>
								<td>Truy cập</td>
							</tr>	
							<tr>
								<td><input type="checkbox" name="roles[]" value="manage_asset"/></td>
								<td>Quản lý</td>
							</tr>	
						</table>			
					</td>
				</tr>
				<tr>
					<td valign="top">
						<table width="200" cellpadding="5">
							<tr class="role-section">
								<td align="center" width="10">
									<input type="checkbox" onclick="$(this).parent('table').slice(0,1).find('input[name*=roles]').set('checked',this.checked)"/>
								</td>
								<td>Danh bạ</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="contact_company"/></td>
								<td>Xem danh bạ cơ quan</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="contact_share"/></td>
								<td>Xem danh bạ chia sẻ</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="contact_person"/></td>
								<td>Quản lý danh bạ cá nhân</td>
							</tr>
							<tr>
								<td><input type="checkbox" name="roles[]" value="contact_company_manage"/></td>
								<td>Quản lý danh bạ cơ quan</td>
							</tr>
						</table>						
					</td>
					<td valign="top">
					</td>
					<td valign="top">
					</td>
					<td valign="top">
					</td>
				</tr>				
			</table>
		</td>
	</tr>
	<tr>
		<td class="x-form-label"></td>
		<td class="x-form-input">
			<input type="submit" class="x-button x-save" value="Thêm mới"  />
			<a href="#Admin/Group" class="x-button x-fresh">Hủy bỏ</a>
		</td>
	</tr>
</table>
</div>
</form>